#include<stdio.h>
#include<unistd.h>
#include<string.h>
int main(int argc,char* argv[])
{
    printf("我是一个进程pid:%d\n",getpid());
    if(argc != 2)
    {
        printf("参数数量错误\n");
        return 1;
    }
    if(strcmp(argv[1],"-bash1")==0)
    {
        printf("功能1\n");
    }
    else if(strcmp(argv[1],"-bash2")==0)
    {
        printf("功能2\n");
    }
    else if(strcmp(argv[1],"-bash3")==0)
    {
        printf("功能3\n");
    }
    else if(strcmp(argv[1],"-bash4")==0)
    {
        printf("功能4\n");
    }
    else
    {
        printf("默认功能\n");
    }
     printf("argc: %d\n", argc);

     for(int i = 0; i < argc; i++ )
     {
         printf("argv[%d] : %s\n",i,argv[i]);
     }
    return 0;
}
